<html><head><title>WriteSerialPortString</title></head>
<body bgcolor="#FFFFDF" link="#009999" vlink="#006666" alink="#006666">
<font face="Arial" size="2"><p align="center"><b><font size="4">WriteSerialPortString()</font></b></p>
<p><b>Syntax</b></p><blockquote>
Result = <font color="#006666"><b>WriteSerialPortString</b></font>(#SerialPort, String$ [, Format])</blockquote>

</blockquote>
<b>Description</b><br><blockquote>

Writes a string to the specified serial port. 

</blockquote><p><b>Parameters</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>#SerialPort</i></td>
<td width="90%"> 
The serial port to use. 

</td></tr>
<tr><td><i>String$</i></td>
<td> 
The string to write. 

</td></tr>
<tr><td><i>Format (optional)</i></td>
<td> 
The string format to use. It can be one of the following value: 
<pre><font face="Courier New, Courier, mono"size="2">  <font color="#924B72">#PB_Ascii</font> : the string will be written in ascii format (default, even in <a href="../reference/unicode.html">unicode</a> mode).
  <font color="#924B72">#PB_UTF8</font>  : the string will be written in UTF8 format.
  <font color="#924B72">#PB_UTF16</font> : the string will be written in UTF16 format.
</font></pre>

</td></tr>
</table>
</blockquote><p><b>Return value</b></p><blockquote>

The number of bytes written to the serial port, or zero if the operation has failed. 

</blockquote><p><b>Remarks</b></p><blockquote>

To check how much data is available in the output buffer, use <a href="availableserialportoutput.html">AvailableSerialPortOutput()</a>. 

</blockquote><p><b>See Also</b></p><blockquote>

<a href="openserialport.html">OpenSerialPort()</a>, <a href="writeserialportdata.html">WriteSerialPortData()</a> 

</Blockquote><p><b>Supported OS </b><Blockquote>All</Blockquote></p><center><- <a href=writeserialportdata.html>WriteSerialPortData()</a> - <a href=index.html>SerialPort Index</a></body></html>